package com.wthink.newMain.view

import android.app.Dialog
import android.content.Context
import android.os.Build
import android.view.Gravity
import android.view.View
import android.view.ViewGroup
import androidx.annotation.RequiresApi
import com.wthink.hzgj.R
import kotlinx.android.synthetic.main.dialog_change_up_down.*
import kotlinx.android.synthetic.main.dialog_msg.*
import kotlinx.android.synthetic.main.dialog_wait_schedle.*
import kotlinx.android.synthetic.main.dialog_wait_schedle.close
import kotlinx.android.synthetic.main.item_new_msg.*

class MsgDialog : Dialog {
    constructor(context: Context) : this(context, 0)
    constructor(context: Context, themeResId: Int) : super(context, R.style.dialog) {
        setContentView(R.layout.dialog_msg)
        window?.setGravity(Gravity.CENTER)
        window?.setLayout(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT)
    }

    fun setOnclickListener(listener: View.OnClickListener) {
        if (close !== null) {
            close.setOnClickListener(listener)
        }
    }

    fun setMsgText(content : String){
        msg_detail.text = content
    }
}

